<div class="slideADContainer" id="idSlideADContainer2">
    <ul id="idSlider2">
        <li><a href="http://www.baidu.com"><img src="/media/main/img/r_song1.jpg" alt="图片上传预览" /></a></li>
        <li><a href="http://www.baidu.com"><img src="/media/main/img/r_song2.jpg" alt="多级联动菜单" /></a></li>
        <li><a href="http://www.baidu.com"><img src="/media/main/img/r_song3.jpg" alt="浮动定位提示" /></a></li>
        <li><a href="http://www.baidu.com"><img src="/media/main/img/r_song4.jpg" alt="数据加载延迟" /></a></li>
        <li><a href="http://www.baidu.com"><img src="/media/main/img/r_song5.jpg" alt="简便文件上传" /></a></li>
    </ul>
    <ul class="num" id="idNum">
    </ul>
</div>

<script>
    var nums = [];
    var timer;
    var n = getID("idSlider2").getElementsByTagName("li").length;
    var st = new SlideTrans("idSlideADContainer2", "idSlider2", n, {
        onStart: function(){     // 设置按钮样式
            forEach(nums, function(o, i){o.className = st.Index == i ? "on": "";})
        }
    });
    for(var i = 1; i <= n; AddNum(i++)){};
    function AddNum(i){
        var num = getID("idNum").appendChild(document.createElement("li"));
        num.innerHTML = i--;
        num.onmouseover = function(){
            timer = setTimeout(function(){num.className = "on"; st.Auto = false; st.Run(i);}, 200);
        }
        num.onmouseout = function(){clearTimeout(timer); num.className = ""; st.Auto = true; st.Run();}
        nums[i] = num;
    }

    st.Run();
</script>